c program to check whether a number is per